function url(s) {
  return `${window.RPConfig.user}/${s}`;
}
function account(s) {
  return `${window.RPConfig.baseURL}/sys/account/${s}`;
}

// 获取用户中心列表
export const getUserCenterList = () => $http.post(url("getUserCenterList"));

// 获取用户中心列表页
// export const getUserCenterPage = param => $http.post(url('getUserListPage?userCenterId=' + param.condition.userCenterId), param);
export function getUserCenterPage({ responseProcess, param }) {
  $http.post(url("getUserListPage?userCenterId=" + param.condition.userCenterId), param).then(res => {
    responseProcess(res.data);
  });
}

// 获取用户信息
export const getUserInfo = param =>
  $http.post(url(`getUserInfo?userCenterId=${param.userCenterId}&userIds=${param.id}&userNames=`), param);

// 导入组
export const importGroup = param => $http.post(account("add/batch"), param);

// 解锁用户密码
export const unlockedUserPwd = param => $http.post(account("password/unlock"), param);
